﻿
namespace System.Management.HyperV.Model.Msvm
{
    /// <summary>
    /// Represents a virtual switch. Each switch has many different ports to which network adapters can be attached. The switch itself is not highly configurable and acts mostly as a placeholder.
    /// </summary>
    /// <remarks>http://msdn.microsoft.com/en-us/library/cc542584(VS.85).aspx</remarks>
    public class VirtualSwitch : CIM.ComputerSystem
    {
        #region Constructor
        internal protected VirtualSwitch(ManagementObject wmiInstance)
            : base(wmiInstance)
        {
        }
        #endregion

        /// <summary>
        /// The maximum number of Chimney offloads allowed for a port on this switch.
        /// </summary>
        public uint MaxChimneyOffloads
        {
            get { return (uint)_dmo.MaxChimneyOffloads; }
        }
        /// <summary>
        /// The maximum number of VM queue (VMQ) offloads allowed for a port on this switch.
        /// </summary>
        public uint MaxVMQOffloads
        {
            get { return (uint)_dmo.MaxVMQOffloads; }
        }
        /// <summary>
        /// The number of learnable addresses for this switch.
        /// </summary>
        public uint NumLearnableAddresses
        {
            get { return (uint)_dmo.NumLearnableAddresses; }
        }
        /// <summary>
        /// The authorization manager scope for the switch service.
        /// </summary>
        public string ScopeOfResidence
        {
            get { return _dmo.ScopeOfResidence as string; }
        }
    }
}
